<%--
  Created by IntelliJ IDEA.
  User: jack
  Date: 2020-06-15
  Time: 14:27
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script>
        function validatePassword() {
            // 验证2次密码输入是否一致
            let pwd1 = document.getElementById("new-password").value;
            let pwd2 = document.getElementById("re-password").value;
            return pwd1 === pwd2;
        }
    </script>
</head>
<body>
<div class="user-center">
    <div class="center-header">
        <div class="tree-nav">
            个人中心
        </div>
        <div class="info-nav">
            个人中心>修改密码
        </div>
    </div>
    <div class="center-body">
        <div class="body-tree">
            <ul class="tree-list">
                <li class="user-info">
                    <a href="/user/toInfo">个人信息</a>
                </li>
                <li class="user-email">
                    <a href="/user/toEmail">绑定邮箱</a>
                </li>
                <li class="user-password active">
                    <a href="/user/toPassword">修改密码</a>
                </li>
                <li class="user-set">
                    <a href="">个人设置</a>
                </li>
            </ul>
        </div>
        <div class="body-content">
            <div class="user-pwd-wrapper">
                <form action="/user/password" method="post" onsubmit="return validatePassword()">
                    <div class="field-wrapper">
                        <p>请修改密码：</p>
                    </div>
                    <div class="new-password">
                        <input type="text" id="new-password" name="password" required placeholder="请输入密码">
                    </div>
                    <div class="re-password">
                        <input type="text" id="re-password" required placeholder="请再输入密码">
                    </div>
                    <div class="btn-wrapper">
                        <button type="submit" class="layui-btn layui-btn-danger">修改密码</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
</body>
</html>
